package com.fabric.javasdktest;

import com.fabric.javasdktest.util.FabricManager;
import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Map;

@SpringBootApplication
public class JavasdktestApplication {


    public static void main(String[] args) throws Exception{
        SpringApplication.run(JavasdktestApplication.class, args);
        ChaincodeManager manager = FabricManager.obtain().getManager();
        String[] arguments =new String[]{"A"};
        //manager.invoke(fcn, arguments);
        Map result = manager.query("query", arguments);
        //Map result = manager.invoke("invoke", arguments);
        System.out.println(result.toString());
       // String directorys = FabricManager.class.getClassLoader().getResource("fabric").getFile();
       // System.out.println("directorys = " + directorys);
    }
}
